Page({
  data: {
    autoplay: true,
    interval: 5000,
    imgUrls: [
      "../../image/swiper1.jpg",
      "../../image/swiper2.jpg",
      "../../image/swiper3.jpg"
    ],
 
    daohang: [
      "首页",
      "补贴爆品",
      "女鞋",
      "宠物",
      "爱车",
      "箱包皮具"
    ],
 
    elements: [{
        image: "../../images/bar/京东(1).png",
        name: "优惠券",
      }, {
        image: "../../images/家电.png",
        name: "9.9元拼",
      },
      {
        image: "../../images/折扣.png",
        name: " 找折扣",
      },
      {
        image: "../../images/闪购.png",
        name: "闪购",
      },
      {
        image: "../../images/豆子.png",
        name: "领金豆",
      },
      {
        image: "../../images/打卡.png",
        name: "打卡有奖",
      }, {
        image: "../../images/西装.png",
        name: "服饰",
      }, {
        image: "../../images/生鲜.png",
        name: "生鲜",
      }, {
        image: "../../images/家电.png",
        name: "家具",
      }, {
        image: "../../images/bar/分类.png",
        name: "全部频道",
      },
    ],
 
  elements2: [
      { image: '../../image/fru/001.jpg',name:'桃子', title: '正宗无锡阳山水蜜桃新鲜水果当季整箱应季湖景白凤软甜礼盒旗舰店',  price: '9.9' },
      { image: '../../image/fru/002.jpg', name:'李子',title: '黄心油桃新鲜应当季水果树上熟整箱黄桃子3/5斤现摘脆甜非毛桃', price: '10.9' },
      { image: '../../image/fru/003.jpg',name:'苹果', title: '陕西正宗洛川苹果脆甜当季新鲜水果红富士冰糖心丑苹果大果一级', price: '15' },
      { image: '../../image/fru/004.jpg',name:'梨子', title: '山东黄金维纳斯苹果新鲜应当季水果烟台苹果非黄元帅奶油富士整箱', price: '4.9' },
  ],

  elements3: [
    { image: '../../image/fru/005.jpg',name:'橘子', title: '正宗无锡阳山水蜜桃新鲜水果当季整箱应季湖景白凤软甜礼盒旗舰店',  price: '9.9' },
    { image: '../../image/fru/006.jpg', name:'红苹果',title: '黄心油桃新鲜应当季水果树上熟整箱黄桃子3/5斤现摘脆甜非毛桃', price: '10.9' },
    { image: '../../image/fru/007.jpg',name:'苹果', title: '陕西正宗洛川苹果脆甜当季新鲜水果红富士冰糖心丑苹果大果一级', price: '15' },
    { image: '../../image/fru/008.jpg',name:'柑橘', title: '山东黄金维纳斯苹果新鲜应当季水果烟台苹果非黄元帅奶油富士整箱', price: '4.9' },
],
  },
  gotodetail(e) {
    const item = e.currentTarget.dataset.item;
    console.log(item);
    wx.navigateTo({
      url: `/pages/detail/detail?title=${item.title}&image=${item.image}&price=${item.price}`
    });
    },
})